<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006-2014 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------

// 应用入口文件

// 检测PHP环境
if(version_compare(PHP_VERSION,'5.6.0','<'))  die('PHP版本不能低于5.6.0 !');

if (!is_file('./data/install.lock')) {
    $url=$_SERVER['HTTP_HOST'].trim($_SERVER['SCRIPT_NAME'],'index.php').'install.php';
    header("Location:http://$url");
    exit;
}

$websoft=strtolower($_SERVER["SERVER_SOFTWARE"]);
$iis=strpos($websoft,'iis');
if(isset($_SERVER['PATH_INFO']) && $iis>0){
    if(($encode = mb_detect_encoding($_SERVER['PATH_INFO'], array('ASCII','GB2312','GBK','UTF-8'))) != 'UTF-8'){
        $_SERVER['PATH_INFO'] = mb_convert_encoding($_SERVER['PATH_INFO'], 'UTF-8', $encode);
    }
}

// 开启调试模式 建议开发阶段开启 部署阶段注释或者设为false
define('APP_DEBUG',false);
define('ROOT_PATH', __DIR__);
define('HTML_PATH', './data/html/');
// 定义应用目录
define('DIR_SECURE_FILENAME', 'index.html');
define('DIR_SECURE_CONTENT', 'deny Access!');
define('APP_PATH','./App/');
define('FTX_IMG_DATA_PATH', './');
define('RUNTIME_PATH', './data/Runtime/');
define('FTX_DATA_PATH', './data/');
define('FTX_VERSION', '3.8.2');
define('FTX_RELEASE', '2019-12-24');
// 引入ThinkPHP入口文件
require './ThinkPHP/ThinkPHP.php';

// 亲^_^ 后面不需要任何代码了 就是如此简单